package drds.binlog.common.zookeeper.running;

import java.util.Map;

/**
 * {@linkplain Monitor}管理容器，使用static进行数据全局共享
 *
 * @author jianghang 2012-12-3 下午09:32:06
 * @version 1.0.0
 */
public class ServerRunningMonitors
{

    private static ServerRunningData serverData;
    private static Map runningMonitors; // <String,
    // Monitor>

    public static ServerRunningData getServerData()
    {
        return serverData;
    }

    public static void setServerData(ServerRunningData serverData)
    {
        ServerRunningMonitors.serverData = serverData;
    }

    public static Map<String, Monitor> getRunningMonitors()
    {
        return runningMonitors;
    }

    public static void setRunningMonitors(Map runningMonitors)
    {
        ServerRunningMonitors.runningMonitors = runningMonitors;
    }

    public static Monitor getRunningMonitor(String destination)
    {
        return (Monitor) runningMonitors.get(destination);
    }

}
